﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_GetSubClass]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_GetSubClass];
GO
CREATE PROCEDURE [dbo].[sproc_GetSubClass]
    @ClassID int
/*

============================================================
功能:    得到@ClassID的子组
参数:
    @ClassID int        :    组（类）ID
============================================================

*/
AS
BEGIN
SET NOCOUNT ON

SELECT * 
    FROM 
        dbo.UDS_CLASS 
    WHERE
		ClassParentID = @ClassID AND ClassParentID <>ClassID
    ORDER BY ClassType ASC;

END
GO
